1. Field of the Invention
The invention relates to Bluetooth advanced audio distribution profile (A2DP) and, in particular, to generating A2DP source code with at least two processors.
2. Description of the Related Art
FIG. 1 is a block diagram of a conventional chipset of an audio player. In FIG. 1, handset chipset 100 comprising a microcontroller unit (MCU) 110 and a digital signal processor (DSP) 120. The MCU 110 is used to communicate with peripherals and access an external storage device 150, such that the audio source data can be retrieved. An audio parser 130 parses retrieved the audio source data, such that the retrieved audio source data can be decoded by a subsequent audio decoder 140 in the DSP 120. The DSP 120 is typically provided with strong computing power, thus is suitable for audio decoding. The audio decoder 140 decodes the retrieved audio source data and generates an audio input to a speaker 160.
The audio player chipset acts as a Bluetooth host with a Bluetooth controller module connected thereto, such that Bluetooth communication is supported. In the Bluetooth host, software implementation typically fulfills communication protocols required for L2CAP services and application programs in a Bluetooth system. L2CAP services comprise a channel manager, a resource manager, and a L2CAP (Logic Link Control and Adaptation Protocol). The communication protocols required for applications are shown in FIG. 2. SDP (Service Discovery Protocol), AVDTP (Audio/Video Distribution Transport Protocol) and so forth are required for A2DP applications.
FIG. 3 is a schematic diagram of a conventional chipset of an audio player supporting Bluetooth A2DP. In FIG. 3, an external Bluetooth controller chip 380 with a built-in SBC encoder 360 is connected to a Bluetooth host 370 in the audio player chipset 300 via a host controller interface (HCI). The audio player chipset 300 transmits decoded pulse code modulation (PCM) audio input to the external Bluetooth controller chip 380 via a digital audio interface. After SBC encoding, the audio data is transmitted to a destination via AVDTP, L2CAP, Baseband, and so forth built into the handset chipset 300. This architecture requires a powerful Bluetooth controller chip, thus the cost of it is high.
FIG. 4 is a schematic diagram of a conventional chipset of an audio player supporting Bluetooth A2DP, a solution using a low cost Bluetooth controller chip 480. The DSP 420 performs audio decoding and generates an output signal in PCM format. The MCU 410 reads the output signal and performs SBC encoding with remaining system resources. The MCU 410 acts as a Bluetooth host 470 performing A2DP source encoding. This architecture requires a powerful MCU provided with enough remaining system resources.